<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>for-in循环</title>
</head>
<body>
<script>
    function println(a){
        document.write(a);
        document.write('<br/>');
    }

    var person={};//字面量创建对象

    //设置字面量对象属性
    person.name='huangshiren';
    person.age=58;
    person.appetite=3;
    person.eat=function (){
        document.write(' 正在吃饭');
    }

    var b;
    for(b in person){
        println(b);
    }
</script>
</body>
</html>